﻿using System;
using System.Collections.Generic;
using System.Text;
using AutoMapper;
using Microsoft.Extensions.Logging;

namespace net.xBei.WebApi.Repository
{
    /// <summary>
    /// 代码仓库
    /// </summary>
    public abstract class BaseRepository: IRepository {
        /// <summary>
        /// 自动映射
        /// </summary>
        protected readonly IMapper mapper;
        /// <summary>
        /// 日志
        /// </summary>
        protected readonly ILogger logger;
        /// <summary>
        /// 
        /// </summary>
        /// <param name="mapper"></param>
        /// <param name="logger"></param>
        public BaseRepository(AutoMapper.IMapper mapper, ILogger logger) {
            this.mapper = mapper;
            this.logger = logger;
        }
    }
    /// <summary>
    /// 代码仓库
    /// </summary>
    public interface IRepository { }
    /// <summary>
    /// 自动注册（Scoped）
    /// </summary>
    public interface IAutoRegisterRepository : IRepository { }
    /// <summary>
    /// 自动注册（Singleton）
    /// </summary>
    public interface IAutoRegisterSingleton : IRepository { }
}
